home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / 335_01.zip / AS6805.TXT < prev    next >
Text File  |  1993-04-01  |  14KB  |  661 lines

  1.  
  2.  
  3.  
  4.                                   - 1 -
  5.  
  6.  
  7.  
  8.        A.  Appendix_for_as6805_Frankenstein_Assembler
  9.  
  10.        A.1  Pseudo_Operations
  11.  
  12.        A.1.1  Standard_Pseudo_Operation_Mnemonics
  13.  
  14.             End                                END
  15.             File Inclusion                     INCL INCLUDE
  16.             If                                 IF
  17.             Else                               ELSE
  18.             End If                             ENDI
  19.             Equate                             EQU
  20.             Set                                SET
  21.             Org                                ORG
  22.             Reserve Memory                     RESERVE RMB
  23.             Define Byte Data                   BYTE DB FCB
  24.             Define Word Data                   DW FDB WORD
  25.             Define String Data                 FCC STRING
  26.             Define Character Set Translation   CHARSET
  27.             Define Character Value             CHARDEF CHD
  28.             Use Character Translation          CHARUSE
  29.  
  30.        A.1.2  Machine_Dependent_Pseudo_Operations
  31.  
  32.        A.1.2.1  Instruction_Set_Selection
  33.  
  34.             CPU string
  35.  
  36.        The instruction set can be specified in the source file with
  37.        the CPU pseudooperation.  The string, delimited by quotes or
  38.        apostrophes, is scanned for a substring which selects which
  39.        instruction set is used.  When the program is invoked, this
  40.        operation is performed on the name of the program, then the
  41.        -p optional arguement, if any, and then any CPU statements.
  42.        The last one selects which subset of the instructions the
  43.        assembler will accept.  The instruction set can be changed
  44.        at any place in the source file.
  45.  
  46.             Instruction Set          Substrings
  47.             68hc05                   hc HC
  48.             146805                   4
  49.             6305                     3
  50.             6805                     05 l05 L05
  51.  
  52.        A.2  Instructions
  53.  
  54.        A.2.1  Instruction_List
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   - 2 -
  71.  
  72.  
  73.  
  74.        Opcode   Syntax                    Selection Criteria
  75.  
  76.  
  77.        ADC       '#' expr
  78.        ADC       expr                     DIRECT
  79.        ADC       expr                     EXTENDED
  80.        ADC       indexed                  INDEX0
  81.        ADC       indexed                  INDEX1
  82.        ADC       indexed                  INDEX2
  83.  
  84.        ADD       '#' expr
  85.        ADD       expr                     DIRECT
  86.        ADD       expr                     EXTENDED
  87.        ADD       indexed                  INDEX0
  88.        ADD       indexed                  INDEX1
  89.        ADD       indexed                  INDEX2
  90.  
  91.        AND       '#' expr
  92.        AND       expr                     DIRECT
  93.        AND       expr                     EXTENDED
  94.        AND       indexed                  INDEX0
  95.        AND       indexed                  INDEX1
  96.        AND       indexed                  INDEX2
  97.  
  98.        ASL       expr                     DIRECT
  99.        ASL       indexed                  INDEX0
  100.        ASL       indexed                  INDEX1
  101.  
  102.        ASLA
  103.  
  104.        ASLX
  105.  
  106.        ASR       expr                     DIRECT
  107.        ASR       indexed                  INDEX0
  108.        ASR       indexed                  INDEX1
  109.  
  110.        ASRA
  111.  
  112.        ASRX
  113.  
  114.        BCC       expr
  115.  
  116.        BCLR      expr ',' expr
  117.  
  118.        BCS       expr
  119.  
  120.        BEQ       expr
  121.  
  122.        BHCC      expr
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                   - 3 -
  137.  
  138.  
  139.  
  140.        Opcode   Syntax                    Selection Criteria
  141.  
  142.  
  143.        BHCS      expr
  144.  
  145.        BHI       expr
  146.  
  147.        BHS       expr
  148.  
  149.        BIH       expr
  150.  
  151.        BIL       expr
  152.  
  153.        BIT       '#' expr
  154.        BIT       expr                     DIRECT
  155.        BIT       expr                     EXTENDED
  156.        BIT       indexed                  INDEX0
  157.        BIT       indexed                  INDEX1
  158.        BIT       indexed                  INDEX2
  159.  
  160.        BLO       expr
  161.  
  162.        BLS       expr
  163.  
  164.        BMC       expr
  165.  
  166.        BMI       expr
  167.  
  168.        BMS       expr
  169.  
  170.        BNE       expr
  171.  
  172.        BPL       expr
  173.  
  174.        BRA       expr
  175.  
  176.        BRCLR     expr ',' expr ',' expr
  177.  
  178.        BRN       expr
  179.  
  180.        BRSET     expr ',' expr ',' expr
  181.  
  182.        BSET      expr ',' expr
  183.  
  184.        BSR       expr
  185.  
  186.        CLC
  187.  
  188.        CLI
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.                                   - 4 -
  203.  
  204.  
  205.  
  206.        Opcode   Syntax                    Selection Criteria
  207.  
  208.  
  209.        CLR       expr                     DIRECT
  210.        CLR       indexed                  INDEX0
  211.        CLR       indexed                  INDEX1
  212.  
  213.        CLRA
  214.  
  215.        CLRX
  216.  
  217.        CMP       '#' expr
  218.        CMP       expr                     DIRECT
  219.        CMP       expr                     EXTENDED
  220.        CMP       indexed                  INDEX0
  221.        CMP       indexed                  INDEX1
  222.        CMP       indexed                  INDEX2
  223.  
  224.        COM       expr                     DIRECT
  225.        COM       indexed                  INDEX0
  226.        COM       indexed                  INDEX1
  227.  
  228.        COMA
  229.  
  230.        COMX
  231.  
  232.        CPX       '#' expr
  233.        CPX       expr                     DIRECT
  234.        CPX       expr                     EXTENDED
  235.        CPX       indexed                  INDEX0
  236.        CPX       indexed                  INDEX1
  237.        CPX       indexed                  INDEX2
  238.  
  239.        DAA                                INSTDAA
  240.  
  241.        DEC       expr                     DIRECT
  242.        DEC       indexed                  INDEX0
  243.        DEC       indexed                  INDEX1
  244.  
  245.        DECA
  246.  
  247.        DECX
  248.  
  249.        EOR       '#' expr
  250.        EOR       expr                     DIRECT
  251.        EOR       expr                     EXTENDED
  252.        EOR       indexed                  INDEX0
  253.        EOR       indexed                  INDEX1
  254.        EOR       indexed                  INDEX2
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.                                   - 5 -
  269.  
  270.  
  271.  
  272.        Opcode   Syntax                    Selection Criteria
  273.  
  274.  
  275.        INC       expr                     DIRECT
  276.        INC       indexed                  INDEX0
  277.        INC       indexed                  INDEX1
  278.  
  279.        INCA
  280.  
  281.        INCX
  282.  
  283.        JMP       expr                     DIRECT
  284.        JMP       expr                     EXTENDED
  285.        JMP       indexed                  INDEX0
  286.        JMP       indexed                  INDEX1
  287.        JMP       indexed                  INDEX2
  288.  
  289.        JSR       expr                     DIRECT
  290.        JSR       expr                     EXTENDED
  291.        JSR       indexed                  INDEX0
  292.        JSR       indexed                  INDEX1
  293.        JSR       indexed                  INDEX2
  294.  
  295.        LDA       '#' expr
  296.        LDA       expr                     DIRECT
  297.        LDA       expr                     EXTENDED
  298.        LDA       indexed                  INDEX0
  299.        LDA       indexed                  INDEX1
  300.        LDA       indexed                  INDEX2
  301.  
  302.        LDX       '#' expr
  303.        LDX       expr                     DIRECT
  304.        LDX       expr                     EXTENDED
  305.        LDX       indexed                  INDEX0
  306.        LDX       indexed                  INDEX1
  307.        LDX       indexed                  INDEX2
  308.  
  309.        LSL       expr                     DIRECT
  310.        LSL       indexed                  INDEX0
  311.        LSL       indexed                  INDEX1
  312.  
  313.        LSLA
  314.  
  315.        LSLX
  316.  
  317.        LSR       expr                     DIRECT
  318.        LSR       indexed                  INDEX0
  319.        LSR       indexed                  INDEX1
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.                                   - 6 -
  335.  
  336.  
  337.  
  338.        Opcode   Syntax                    Selection Criteria
  339.  
  340.        LSRA
  341.  
  342.        LSRX
  343.  
  344.        MUL                                INSTMUL
  345.  
  346.        NEG       expr                     DIRECT
  347.        NEG       indexed                  INDEX0
  348.        NEG       indexed                  INDEX1
  349.  
  350.        NEGA
  351.  
  352.        NEGX
  353.  
  354.        NOP
  355.  
  356.        ORA       '#' expr
  357.        ORA       expr                     DIRECT
  358.        ORA       expr                     EXTENDED
  359.        ORA       indexed                  INDEX0
  360.        ORA       indexed                  INDEX1
  361.        ORA       indexed                  INDEX2
  362.  
  363.        ROL       expr                     DIRECT
  364.        ROL       indexed                  INDEX0
  365.        ROL       indexed                  INDEX1
  366.  
  367.        ROLA
  368.  
  369.        ROLX
  370.  
  371.        ROR       expr                     DIRECT
  372.        ROR       indexed                  INDEX0
  373.        ROR       indexed                  INDEX1
  374.  
  375.        RORA
  376.  
  377.        RORX
  378.  
  379.        RSP
  380.  
  381.        RTI
  382.  
  383.        RTS
  384.  
  385.        SBC       '#' expr
  386.        SBC       expr                     DIRECT
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                                   - 7 -
  401.  
  402.  
  403.  
  404.        Opcode   Syntax                    Selection Criteria
  405.  
  406.        SBC       expr                     EXTENDED
  407.        SBC       indexed                  INDEX0
  408.        SBC       indexed                  INDEX1
  409.        SBC       indexed                  INDEX2
  410.  
  411.        SEC
  412.  
  413.        SEI
  414.  
  415.        STA       expr                     DIRECT
  416.        STA       expr                     EXTENDED
  417.        STA       indexed                  INDEX0
  418.        STA       indexed                  INDEX1
  419.        STA       indexed                  INDEX2
  420.  
  421.        STOP                               INSTSTWA
  422.  
  423.        STX       expr                     DIRECT
  424.        STX       expr                     EXTENDED
  425.        STX       indexed                  INDEX0
  426.        STX       indexed                  INDEX1
  427.        STX       indexed                  INDEX2
  428.  
  429.        SUB       '#' expr
  430.        SUB       expr                     DIRECT
  431.        SUB       expr                     EXTENDED
  432.        SUB       indexed                  INDEX0
  433.        SUB       indexed                  INDEX1
  434.        SUB       indexed                  INDEX2
  435.  
  436.        SWI
  437.  
  438.        TAX
  439.  
  440.        TST       expr                     DIRECT
  441.        TST       indexed                  INDEX0
  442.        TST       indexed                  INDEX1
  443.  
  444.        TSTA
  445.  
  446.        TSTX
  447.  
  448.        TXA
  449.  
  450.        WAIT                               INSTSTWA
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.                                   - 8 -
  467.  
  468.  
  469.  
  470.        A.2.2  Selection_Criteria_Keywords
  471.  
  472.             DIRECT              The direct addressing mode can be
  473.                                 used if the expression has a value
  474.                                 between 0 and 255. The expression
  475.                                 will be treated as a two byte long
  476.                                 value if it is not defined when the
  477.                                 statement is processed in the first
  478.                                 pass.
  479.  
  480.             EXTENDED            The expression can be a 2 byte long
  481.                                 value.
  482.  
  483.             INDEX0              The Indexed addressing mode with no
  484.                                 offset can be used.
  485.  
  486.             INDEX1              The Indexed addressing mode with a
  487.                                 one byte offset can be used.
  488.  
  489.             INDEX2              The Indexed addressing mode with
  490.                                 two byte offset can be used.
  491.  
  492.             INSTSTWA            The instruction is only available
  493.                                 in the 146805, 6305, and 68hc05
  494.                                 instruction sets.
  495.  
  496.             INSTMUL             The instruction is only available
  497.                                 in the 68hc05 instruction set.
  498.  
  499.             INSTDAA             The instruction is only available
  500.                                 in the 6305 instruction set.
  501.  
  502.        A.2.3  Apostrophes  The apostrophes in the syntax field are
  503.        a notation used for the parser generator and are not put in
  504.        the assembler source statement.
  505.  
  506.        A.3  Notes
  507.  
  508.        A.3.1  Bit_Numbers  The bit number expression in the BSET,
  509.        BCLR, BRCLR, BRSET operations has to have value defined when
  510.        the instruction is read in the first pass.  The value must
  511.        be between 0 and 7.
  512.  
  513.        A.3.2  Indexed_Addressing  The indexed addressing mode is
  514.        represented in two ways.
  515.  
  516.        First, with no offset, the form ",X" is used.
  517.  
  518.        Second, the form "expression, X" is used for both the one
  519.        and two byte offsets modes. The expression will be treated
  520.        as a two byte long value if it is not defined when the
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.                                   - 9 -
  533.  
  534.  
  535.  
  536.        statement is processed in the first pass.
  537.  
  538.        A.3.3  Reserved_Symbols
  539.  
  540.        A.3.3.1  Machine_Dependent_Reserved_Symbols  X x
  541.  
  542.        A.3.3.2  Standard_Reserved_Symbols  AND DEFINED EQ GE GT
  543.        HIGH LE LOW LT MOD NE NOT OR SHL SHR XOR and defined eq ge
  544.        gt high le low lt mod ne not or shl shr xor
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.  
  602.                                  CONTENTS
  603.  
  604.  
  605.        A.  Appendix for as6805 Frankenstein Assembler...........  1
  606.            A.1  Pseudo Operations...............................  1
  607.            A.2  Instructions....................................  1
  608.            A.3  Notes...........................................  8
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.                                   - i -
  657.  
  658.  
  659.  
  660.  
  661.